$(function() {
   // Save input value to localStorage
   $('#save').on('click', function() {
      var username = 'Nico'; //$('#username').val();
      localStorage.setItem("username", username);
   });
   // Load input value from localStorage
   $('#load').on('click', function() {
      var username = localStorage.getItem('username') || '<empty>';
      alert(username);
      $('#username').val(username);
   });
   // Clear localStorage
   $('#clear').on('click', function() {
      localStorage.clear();
   });
});
